package service;

import Util.SqlSessionUtil;
import dao.NingboGDPMapper;
import dao.NingboIncomeExpenditureMapper;
import domain.NingboGDP;
import domain.NingboIncomeExpenditure;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class NingboIEService {
    public List<NingboIncomeExpenditure> selectDataByCity(String city){
        SqlSession session = SqlSessionUtil.getSession().openSession();;
        NingboIncomeExpenditureMapper operation = session
                .getMapper(NingboIncomeExpenditureMapper.class);
        List<NingboIncomeExpenditure> nbieList = operation.selectByCity(city);
        session.commit();
        session.close();
        return nbieList;
    }

    public static void main(String[] args) {
        NingboIEService n = new NingboIEService();
        System.out.println(n.selectDataByCity("鄞州"));
    }
}
